﻿using Application.Services.Interface.Organization;
using Framework.Domain.Interface.Factorys;
using Microsoft.AspNetCore.Mvc;
using System;

namespace API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class OrgController : ControllerBase
    {


        #region 部门
        /// <summary>
        /// 获取全部部门
        /// </summary>
        /// <returns></returns>
        [HttpGet]
        public ActionResult DepartmentAll()
        {
            IDepartmentAppService deptAppService = ExampleFactory.CreateAppService<IDepartmentAppService>();



            string json = "";
            return Ok(json);
        }

        [HttpGet]
        public ActionResult Department(Guid keyId)
        {
            IDepartmentAppService deptService = ExampleFactory.CreateAppService<IDepartmentAppService>();
            var resp = deptService.GetDepartmenByKeyId(keyId);
            return Ok(resp);
        }

        #endregion


    }
}
